import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.LangDataKeys
import com.intellij.openapi.ui.Messages
import java.io.File

class DpUnifyAction : AnAction() {
    override fun actionPerformed(event: AnActionEvent) {
        val actionFolder = event.getData(LangDataKeys.VIRTUAL_FILE)
        actionFolder?.canonicalPath?.let { DpFileModifier().modifyFiles(File(it)) }

        Messages.showMessageDialog("已完成", "操作结果", Messages.getInformationIcon())
    }
}